﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MovieStorage;

namespace DVDFilmoteka.src.SaveloadManagement.ImportFilters
{
    public class Import12
    {
        public static List<MovieDataStore12> import(List<MovieDataStore> loaded)
        {
            List<MovieDataStore12> returnList = new List<MovieDataStore12>();

            foreach (var item in loaded)
            {
                MovieDataStore12 new_item = new MovieDataStore12();

                new_item.compression = item.compression;
                new_item.container = item.container;
                new_item.csfdRating = item.csfdRating;
                new_item.czechName = item.czechName;
                new_item.fileName = item.fileName;
                new_item.channelCount = item.channelCount;
                new_item.imdbRating = item.imdbRating;
                new_item.language = item.language;
                new_item.link = item.link;
                new_item.mainGenre = item.mainGenre;
                if (new_item.mainGenre.ToLower().Equals("pohádky")) new_item.mainGenre = "Pohádka"; // CSFD Zmenily zanr
                new_item.medium = item.medium;
                new_item.mediumNotes = item.mediumNotes;
                new_item.movieNotes = item.movieNotes;
                new_item.myRating = item.myRating;
                new_item.originalName = item.originalName;
                new_item.otherGenre = item.otherGenre;
                new_item.quality = item.quality;
                new_item.resolution = item.resolution;
                new_item.size = item.size;
                new_item.timeOfAddtion = DateTime.Now;
                new_item.uniqueId = item.uniqueId;

                new_item.actors = new SerializableDictionary<string, string>();
                new_item.country = "";
                new_item.directorLink = "";
                new_item.directorName = "";
                new_item.length = "";
                new_item.pictureData = "";
                new_item.pictureLink = "";
                new_item.recenze = "";
                new_item.year = "";

                returnList.Add(new_item);
            }

            return returnList;
        }
    }
}
